/ MacTech 1 to 12
/ MacTech-vol-1-12.toast / Source / develop™ Technical Journal / develop Issue 11 code / The NetWork Project.sea / The NetWork Project / Examples (Sources) / NetSim / HistogramUnit.p ![]() | < prev | next > |
MacBinary | 1992-07-15 | 2.0 KB | [TEXT/MPS ] |
Confidence | Program | Detection | Match Type | Support |
---|---|---|---|---|
66% | dexvert | ZX81 Sinclair BASIC (image/sinclairBASIC) | ext | Supported |
10% | dexvert | MacBinary (archive/macBinary) | fallback | Supported |
1% | dexvert | Text File (text/txt) | fallback | Supported |
100% | file | MacBinary II, inited, Wed Jul 15 16:25:44 1992, modified Wed Jul 15 16:25:44 1992, creator 'MPS ', type ASCII, 1300 bytes "HistogramUnit.p" , at 0x594 495 bytes resource | default (weak) | |
99% | file | data | default | |
74% | TrID | Macintosh plain text (MacBinary) | default | |
25% | TrID | MacBinary 2 | default (weak) | |
100% | siegfried | fmt/1762 MacBinary (II) | default | |
100% | lsar | MacBinary | default |
id metadata | |
---|---|
key | value |
macFileType | [TEXT] |
macFileCreator | [MPS ] |
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0f 48 69 73 74 6f 67 | 72 61 6d 55 6e 69 74 2e |..Histog|ramUnit.|
|00000010| 70 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |p.......|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 05 14 00 | 00 01 ef a6 8a 3a 48 a6 |........|.....:H.|
|00000060| 8a 3a 48 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.:H.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 02 bf 00 00 |........|........|
|00000080| 75 6e 69 74 20 68 69 73 | 74 6f 67 72 61 6d 55 6e |unit his|togramUn|
|00000090| 69 74 3b 0d 0d 7b 20 43 | 6f 70 79 72 69 67 68 74 |it;..{ C|opyright|
|000000a0| 20 a9 20 47 2e 20 53 61 | 77 69 74 7a 6b 69 2c 20 | . G. Sa|witzki, |
|000000b0| 53 74 61 74 4c 61 62 20 | 48 65 69 64 65 6c 62 65 |StatLab |Heidelbe|
|000000c0| 72 67 20 7d 0d 0d 69 6e | 74 65 72 66 61 63 65 0d |rg }..in|terface.|
|000000d0| 0d 75 73 65 73 20 74 79 | 70 65 73 3b 0d 7b 24 53 |.uses ty|pes;.{$S|
|000000e0| 65 74 63 20 70 61 72 61 | 6e 6f 69 61 3d 74 72 75 |etc para|noia=tru|
|000000f0| 65 7d 09 09 7b 74 65 73 | 74 20 66 6f 72 20 63 6f |e}..{tes|t for co|
|00000100| 6e 64 69 74 69 6f 6e 73 | 20 77 68 69 63 68 20 73 |nditions| which s|
|00000110| 69 6d 70 6c 79 20 73 68 | 6f 75 6c 64 20 6e 6f 74 |imply sh|ould not|
|00000120| 20 68 61 70 70 65 6e 2e | 7d 0d 0d 63 6f 6e 73 74 | happen.|}..const|
|00000130| 0d 09 7b 6d 61 78 63 6c | 61 73 73 20 3d 20 31 32 |..{maxcl|ass = 12|
|00000140| 37 3b 20 20 7d 20 20 20 | 20 7b 6d 61 78 69 6d 75 |7; } | {maximu|
|00000150| 6d 20 63 6c 61 73 73 20 | 69 6e 20 68 69 73 74 6f |m class |in histo|
|00000160| 67 72 61 6d 2e 20 6d 75 | 73 74 20 62 65 20 6f 64 |gram. mu|st be od|
|00000170| 64 7d 0d 09 6d 61 78 63 | 6c 61 73 73 20 3d 20 36 |d}..maxc|lass = 6|
|00000180| 33 3b 20 20 7b 63 65 6c | 6c 73 20 61 72 65 20 30 |3; {cel|ls are 0|
|00000190| 2e 2e 6d 61 78 63 6c 61 | 73 73 7d 0d 0d 74 79 70 |..maxcla|ss}..typ|
|000001a0| 65 0d 09 68 69 73 74 74 | 79 70 65 20 3d 20 72 65 |e..histt|ype = re|
|000001b0| 63 6f 72 64 0d 09 09 63 | 6f 75 6e 74 09 09 3a 20 |cord...c|ount..: |
|000001c0| 6c 6f 6e 67 69 6e 74 3b | 20 7b 74 6f 74 61 6c 20 |longint;| {total |
|000001d0| 6e 75 6d 62 65 72 20 6f | 66 20 6f 62 73 65 72 76 |number o|f observ|
|000001e0| 61 74 69 6f 6e 73 20 69 | 6e 20 68 69 73 74 6f 67 |ations i|n histog|
|000001f0| 72 61 6d 7d 0d 09 09 6d | 61 78 62 69 6e 63 6f 75 |ram}...m|axbincou|
|00000200| 6e 74 09 3a 20 6c 6f 6e | 67 69 6e 74 3b 20 7b 6d |nt.: lon|gint; {m|
|00000210| 61 78 69 6d 75 6d 20 6e | 75 6d 62 65 72 20 6f 66 |aximum n|umber of|
|00000220| 20 6f 62 73 65 72 76 61 | 74 69 6f 6e 73 20 69 6e | observa|tions in|
|00000230| 20 6f 6e 65 20 62 69 6e | 7d 0d 09 09 62 69 6e 77 | one bin|}...binw|
|00000240| 69 64 74 68 09 3a 20 65 | 78 74 65 6e 64 65 64 3b |idth.: e|xtended;|
|00000250| 7b 65 71 75 69 64 69 73 | 74 61 6e 74 2e 20 6e 6f |{equidis|tant. no|
|00000260| 74 20 79 65 74 20 64 65 | 66 69 6e 65 64 3a 20 69 |t yet de|fined: i|
|00000270| 6e 66 2e 7d 0d 09 09 6d | 69 6e 2c 20 6d 61 78 09 |nf.}...m|in, max.|
|00000280| 3a 20 65 78 74 65 6e 64 | 65 64 3b 7b 6d 69 6e 20 |: extend|ed;{min |
|00000290| 61 6e 64 20 6d 61 78 20 | 66 6f 72 20 68 69 73 74 |and max |for hist|
|000002a0| 6f 67 72 61 6d 20 28 6e | 6f 74 20 64 61 74 61 29 |ogram (n|ot data)|
|000002b0| 7d 0d 09 09 7b 63 65 6c | 6c 73 20 61 72 65 20 6c |}...{cel|ls are l|
|000002c0| 65 66 74 3d 6d 69 6e 2b | 69 2a 62 69 6e 77 69 64 |eft=min+|i*binwid|
|000002d0| 74 68 3c 20 78 20 b2 72 | 69 67 68 74 3d 6d 69 6e |th< x .r|ight=min|
|000002e0| 2b 28 69 2b 31 29 2a 62 | 69 6e 77 69 64 74 68 2e |+(i+1)*b|inwidth.|
|000002f0| 20 7d 0d 09 09 7b 72 69 | 67 68 74 20 65 6e 64 20 | }...{ri|ght end |
|00000300| 6e 65 65 64 73 20 74 6f | 20 62 65 20 69 6e 63 6c |needs to| be incl|
|00000310| 75 64 65 64 20 74 6f 20 | 61 6c 6c 6f 77 20 63 61 |uded to |allow ca|
|00000320| 6c 63 75 6c 61 74 69 6f | 6e 20 6f 66 20 64 69 73 |lculatio|n of dis|
|00000330| 74 72 69 62 75 74 69 6f | 6e 20 66 75 6e 63 74 69 |tributio|n functi|
|00000340| 6f 6e 7d 0d 09 09 63 6e | 74 3a 20 61 72 72 61 79 |on}...cn|t: array|
|00000350| 5b 30 2e 2e 6d 61 78 63 | 6c 61 73 73 5d 20 6f 66 |[0..maxc|lass] of|
|00000360| 20 6c 6f 6e 67 69 6e 74 | 3b 0d 09 09 69 64 3a 20 | longint|;...id: |
|00000370| 73 74 72 31 35 3b 0d 09 | 65 6e 64 3b 0d 0d 09 74 |str15;..|end;...t|
|00000380| 53 74 61 74 54 79 70 65 | 20 3d 20 72 65 63 6f 72 |StatType| = recor|
|00000390| 64 0d 09 09 63 6f 75 6e | 74 3a 20 6c 6f 6e 67 69 |d...coun|t: longi|
|000003a0| 6e 74 3b 0d 09 09 6d 65 | 61 6e 3a 20 65 78 74 65 |nt;...me|an: exte|
|000003b0| 6e 64 65 64 3b 0d 09 09 | 73 73 71 3a 20 65 78 74 |nded;...|ssq: ext|
|000003c0| 65 6e 64 65 64 3b 0d 09 | 09 6d 69 6e 2c 20 6d 61 |ended;..|.min, ma|
|000003d0| 78 3a 20 65 78 74 65 6e | 64 65 64 3b 0d 09 09 69 |x: exten|ded;...i|
|000003e0| 64 3a 20 73 74 72 31 35 | 3b 0d 09 65 6e 64 3b 0d |d: str15|;..end;.|
|000003f0| 0d 70 72 6f 63 65 64 75 | 72 65 20 69 6e 69 74 53 |.procedu|re initS|
|00000400| 74 61 74 28 76 61 72 20 | 73 74 61 74 3a 74 53 74 |tat(var |stat:tSt|
|00000410| 61 74 54 79 70 65 3b 6e | 61 6d 65 3a 73 74 72 31 |atType;n|ame:str1|
|00000420| 35 29 3b 0d 70 72 6f 63 | 65 64 75 72 65 20 61 64 |5);.proc|edure ad|
|00000430| 64 73 74 61 74 20 28 77 | 3a 20 65 78 74 65 6e 64 |dstat (w|: extend|
|00000440| 65 64 3b 20 76 61 72 20 | 73 74 61 74 3a 20 74 53 |ed; var |stat: tS|
|00000450| 74 61 74 54 79 70 65 29 | 3b 0d 0d 70 72 6f 63 65 |tatType)|;..proce|
|00000460| 64 75 72 65 20 61 64 64 | 62 69 73 74 61 74 20 28 |dure add|bistat (|
|00000470| 78 2c 20 79 3a 20 65 78 | 74 65 6e 64 65 64 3b 20 |x, y: ex|tended; |
|00000480| 76 61 72 20 78 73 74 61 | 74 2c 20 79 73 74 61 74 |var xsta|t, ystat|
|00000490| 3a 20 74 53 74 61 74 54 | 79 70 65 3b 20 76 61 72 |: tStatT|ype; var|
|000004a0| 20 78 79 73 73 71 3a 20 | 65 78 74 65 6e 64 65 64 | xyssq: |extended|
|000004b0| 29 3b 0d 0d 0d 70 72 6f | 63 65 64 75 72 65 20 69 |);...pro|cedure i|
|000004c0| 6e 69 74 48 69 73 74 6f | 67 72 61 6d 20 28 76 61 |nitHisto|gram (va|
|000004d0| 72 20 68 69 73 74 3a 20 | 68 69 73 74 74 79 70 65 |r hist: |histtype|
|000004e0| 3b 6e 61 6d 65 3a 73 74 | 72 31 35 29 3b 0d 70 72 |;name:st|r15);.pr|
|000004f0| 6f 63 65 64 75 72 65 20 | 61 64 64 68 69 73 74 20 |ocedure |addhist |
|00000500| 28 76 61 6c 3a 20 65 78 | 74 65 6e 64 65 64 3b 20 |(val: ex|tended; |
|00000510| 76 61 72 20 68 69 73 74 | 3a 20 68 69 73 74 74 79 |var hist|: histty|
|00000520| 70 65 29 3b 0d 66 75 6e | 63 74 69 6f 6e 20 68 69 |pe);.fun|ction hi|
|00000530| 73 74 6f 67 72 61 6d 63 | 65 6c 6c 28 76 61 6c 3a |stogramc|ell(val:|
|00000540| 20 65 78 74 65 6e 64 65 | 64 3b 20 76 61 72 20 68 | extende|d; var h|
|00000550| 69 73 74 3a 20 68 69 73 | 74 74 79 70 65 29 3a 69 |ist: his|ttype):i|
|00000560| 6e 74 65 67 65 72 3b 0d | 0d 09 69 6d 70 6c 65 6d |nteger;.|..implem|
|00000570| 65 6e 74 61 74 69 6f 6e | 0d 7b 24 49 20 68 69 73 |entation|.{$I his|
|00000580| 74 6f 67 72 61 6d 75 6e | 69 74 2e 69 6e 63 7d 0d |togramun|it.inc}.|
|00000590| 65 6e 64 2e 00 00 00 00 | 00 00 00 00 00 00 00 00 |end.....|........|
|000005a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000600| 00 00 01 00 00 00 01 9d | 00 00 00 9d 00 00 00 52 |........|.......R|
|00000610| 03 08 3c 2e 00 0e 28 6e | 00 08 30 06 04 40 60 e0 |..<...(n|..0..@`.|
|00000620| 67 06 53 40 67 06 60 0c | 7e 64 60 16 20 54 2e 28 |g.S@g.`.|~d`. T.(|
|00000630| 0f 48 69 73 74 6f 67 72 | 61 6d 55 6e 69 74 2e 70 |.Histogr|amUnit.p|
|00000640| 02 00 00 00 54 45 58 54 | 4d 50 53 20 01 00 ff ff |....TEXT|MPS ....|
|00000650| 00 00 54 45 58 54 4d 50 | 53 20 01 00 ff ff ff ff |..TEXTMP|S ......|
|00000660| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000670| 00 00 9c 39 0d 1f 00 00 | 05 14 00 00 01 ef 00 08 |...9....|........|
|00000680| 4e ad 04 72 4f ef 00 0c | 4c ee 10 80 ff f8 4e 5e |N..rO...|L.....N^|
|00000690| 4e 75 4e 56 00 00 20 2d | ff c2 4e 5e 4e 75 4e 56 |NuNV.. -|..N^NuNV|
|000006a0| 00 00 2f 07 3e 2e 00 0e | 66 06 20 2d ff c2 60 12 |../.>...|f. -..`.|
|000006b0| 30 07 53 40 48 c0 2f 00 | 2f 2e 00 08 4e ad 00 7a |0.S@H./.|/...N..z|
|000006c0| 50 8f 2e 2e ff fc 4e 5e | 4e 75 4e 56 00 00 2f 07 |P.....N^|NuNV../.|
|000006d0| 2e 2e 00 0c 70 01 be ad | ff c2 67 18 2f 00 2f 07 |....p...|..g././.|
|000006e0| 2f 2e 00 08 4e ad 00 82 | 50 8f 22 00 20 1f 4a 01 |/...N...|P.". .J.|
|000006f0| 66 02 70 00 2e 2e ff fc | 4e 5e 4e 75 4e 56 00 00 |f.p.....|N^NuNV..|
|00000700| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 64 01 de |...H..Mo|naco.d..|
|00000710| 00 00 00 00 00 00 05 fc | 7f ff 01 df 00 03 02 7d |........|.......}|
|00000720| 7f ff 7f ff 00 00 00 06 | 00 04 00 66 00 23 01 ab |........|...f.#..|
|00000730| 02 4b 00 66 00 23 01 ab | 02 4b a4 ca 53 d9 00 00 |.K.f.#..|.K..S...|
|00000740| 05 10 00 00 05 10 00 00 | 00 00 01 00 00 00 00 1e |........|........|
|00000750| 00 66 00 23 01 ab 02 4b | 00 66 00 23 01 ab 02 4b |.f.#...K|.f.#...K|
|00000760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000770| 00 2b 01 23 80 00 00 00 | 05 31 2e 32 2e 33 1e 31 |.+.#....|.1.2.3.1|
|00000780| 2e 32 2e 33 a9 31 39 39 | 31 54 68 65 20 4e 65 74 |.2.3.199|1The Net|
|00000790| 57 6f 72 6b 20 50 72 6f | 6a 65 63 74 20 00 00 01 |Work Pro|ject ...|
|000007a0| 00 00 00 01 9d 00 00 00 | 9d 00 00 00 52 00 48 3c |........|....R.H<|
|000007b0| 78 08 d2 00 00 00 1c 00 | 52 00 01 4d 50 53 52 00 |x.......|R..MPSR.|
|000007c0| 01 00 12 76 65 72 73 00 | 00 00 2a 03 ed ff ff 00 |...vers.|..*.....|
|000007d0| 00 00 00 00 00 00 00 03 | f0 ff ff 00 00 00 4c 00 |........|......L.|
|000007e0| 00 00 00 00 02 ff ff 20 | 00 00 6e 00 48 37 d0 00 |....... |..n.H7..|
|000007f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+